<!-- <template>
  <main>
    <el-button type="primary" plain @click="toggleDark()"> Is Dark: {{ isDark }} </el-button>
  </main>
</template> -->

<template></template>

<script setup>
import { useDark, useToggle } from '@vueuse/core'
const isDark = useDark()
const toggleDark = useToggle(isDark)

onMounted(() => {
  let isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
  toggleDark(isDarkMode)
})
</script>
